package fr.ensai.lignededix.bd;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.List;

import fr.ensai.lignededix.exceptions.FonctionalException;
import fr.ensai.lignededix.exceptions.TechnicalException;
import fr.ensai.lignededix.installation.Installation;
import fr.ensai.lignededix.metier.partie.Partie;

public class InstallationDAO extends DAO<Installation> {
	
	@Override
	public void executerRequete(String ligne) throws TechnicalException {


		try {
			Statement instruction = connect.createStatement();

			instruction.executeQuery(ligne);


		} catch (SQLException e) {
			throw new TechnicalException("Une erreur technique est survenue.");

		} catch (NullPointerException npe){
			throw new TechnicalException("Une erreur technique est survenue.");
		}

	}

	@Override
	public Installation find(int id) {
		throw new UnsupportedOperationException();
	}

	@Override
	public int create(Installation obj) {
		throw new UnsupportedOperationException();
	}

	@Override
	public Installation update(Installation obj) {
		throw new UnsupportedOperationException();
	}

	@Override
	public void delete(Installation obj) {
		throw new UnsupportedOperationException();

	}

	@Override
	public boolean isPseudoValide(String pseudo) {
		throw new UnsupportedOperationException();
	}

	@Override
	public int authentifier(String pseudo, String mdp) {
		throw new UnsupportedOperationException();
	}


	@Override
	public void updateDateFin(Installation obj) {
		throw new UnsupportedOperationException();
	}



	@Override
	public String calculerDesStatistiques(Installation obj) throws FonctionalException {
		throw new UnsupportedOperationException();
	}

	@Override
	public List<Installation> getAll(int idUtilisateur1, int idUtilisateur2) {
		throw new UnsupportedOperationException();
	}

	@Override
	public void sinscrireSurListeAttente(Installation obj)
			throws FonctionalException {
		throw new UnsupportedOperationException();
		
	}

	@Override
	public List<Installation> obtenirListeAttente(Installation obj)
			throws FonctionalException {
		throw new UnsupportedOperationException();
	}

	@Override
	public void desinscrireListeAttente(Installation obj)
			throws FonctionalException {
		throw new UnsupportedOperationException();
		
	}
	
	@Override
	public void updateScore(Partie partieInterrompueOuFinie)
			throws FonctionalException {
		throw new UnsupportedOperationException();
		
	}

	//Les constructeurs


	public InstallationDAO(Connection connect) {
		this.connect=connect;
	}



}
